There can be multiple tables with the same name but different family
attribute (inet, ip, ip6, ...). The same goes for chains. So the family
attribute needs to be considered when rendering chains and rules.
Signed-off-by: Stefan Kleeschulte <[email protected]>
]));
for (var i = 0; i < data.length; i++)
- if (typeof(data[i].rule) == 'object' && data[i].rule.table == spec.table && data[i].rule.chain == spec.name)
+ if (typeof(data[i].rule) == 'object' && data[i].rule.table == spec.table && data[i].rule.chain == spec.name && data[i].rule.family == spec.family)
node.lastElementChild.appendChild(this.renderRule(data, data[i].rule));
if (node.lastElementChild.childNodes.length == 1)
]);
for (var i = 0; i < data.length; i++)
- if (typeof(data[i].chain) == 'object' && data[i].chain.table == spec.name)
+ if (typeof(data[i].chain) == 'object' && data[i].chain.table == spec.name && data[i].chain.family == spec.family)
node.lastElementChild.lastElementChild.appendChild(this.renderChain(data, data[i].chain));
return node;